<% @page_title = "Add new book" %>
<%= stylesheet_link_tag "admin/form", :media => "all" %>

<div class="create-book-form">
  <h1>Add new book</h1>
  <div class='content'>
	<%= form_tag({:action => 'create'}, :multipart => true) do %>
	<p><label for="book_title">Title</label><%= text_field 'book', 'title' %></p>
	
	 <p><label for="book_author">Author</label><%= text_field 'book', 'author' %></p>
	
	 <p><label for="book_publisher">Publisher</label><%= text_field 'book', 'publisher' %></p>
	
	 <p><label for="book_price">Price</label><%= text_field 'book', 'price' %></p>
	
	 <p><label for="book_quantity">Quantity</label><%= text_field 'book', 'quantity' %></p>
	
	 <p><label for="book_description">Description</label><%= text_field 'book', 'description' %></p>
	
	 <p><label for="book_available">Available Quantity</label><%= text_field 'book', 'free_quantity' %></p>
	
	 <p><label for="book_category">Category</label><%= collection_select(:book,:book_category_id,@categories,:id,:category_name) %></p>
	
	<p><label for="book_image_url">Image</label><%= file_field 'book', 'image_url' %></p>
	
	 <p class='action'><label>&nbsp;</label><%= submit_tag "Save" %><%= link_to "Back", :controller => "admin/book", :action => "index" %></p>
	
	<% end %>
   </div><!-- ENd. content -->
</div><!-- End -->
